<template>
  <div
    id="searchResultBox"
    style="
      width: 100%;
      height: 200px;
      position: relative;
      overflow: hidden;
      border-bottom: 2px solid #eee;
      padding-bottom: 10px;
      margin-bottom: 10px;
    "
    class="sc-display"
  >
    <img
      src="imgs/video/v1.png"
      style="height: 200px; width: 160px"
      class="border-none"
    />
    <div style="height: 200px" class="searchResultItem">
      <div
        style="width: 100%; height: 40px; padding-left: 10px"
        class="sc-display"
      >
        <span class="font20d">{{ searchlist.title }}</span>
        <span class="font16h">（赵老师精品课程）</span>
      </div>
      <div
        style="width: 100%; height: 40px; padding-left: 10px"
        class="border-none sc-display"
      >
        <span class="font14d">时&nbsp;&nbsp;长：</span>
        <span class="font14f">45分钟</span>
      </div>
      <div
        style="width: 100%; height: 80px; padding-left: 10px"
        class="sc-display border-none"
      >
        <span class="font14d moreinfo4"
          >简&nbsp;&nbsp;介：{{ searchlist.content }}</span
        >
      </div>
      <div
        style="width: 100%; height: 40px; padding-left: 10px"
        class="se-display border-none"
      >
        <div
          style="
            width: 23.5%;
            height: 34px;
            background-color: #eee;
            border-radius: 6px;
            margin-right: 1.5%;
          "
          class="cc-display"
        >
          <span class="font14e">01&nbsp;&nbsp;&nbsp;</span>
          <span class="font14e">入门第一讲</span>
        </div>
        <div
          style="
            width: 23.5%;
            height: 34px;
            background-color: #eee;
            border-radius: 6px;
            margin-right: 1.5%;
          "
          class="cc-display"
        >
          <span class="font14e">01&nbsp;&nbsp;&nbsp;</span>
          <span class="font14e">入门第一讲</span>
        </div>
        <div
          style="
            width: 23.5%;
            height: 34px;
            background-color: #eee;
            border-radius: 6px;
            margin-right: 1.5%;
          "
          class="cc-display"
        >
          <span class="font14e">01&nbsp;&nbsp;&nbsp;</span>
          <span class="font14e">入门第一讲</span>
        </div>
        <div
          style="
            width: 23.5%;
            height: 34px;
            background-color: #eee;
            border-radius: 6px;
            margin-right: 1.5%;
          "
          class="cc-display"
        >
          <span class="font14e">01&nbsp;&nbsp;&nbsp;</span>
          <span class="font14e">入门第一讲</span>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
// @ is an alias to /src
// import SelectedItem from "@/views/article/SelectedItem.vue";

export default {
  name: "Search",
  props: {
    searchlist: Object
  },
  components: {
    // SelectedItem,
  },
  data() {
    return {};
  },
  mounted() {
    this.startWidth();
    window.onresize = () => {
      // console.log(1);
    };
  },
  methods: {
    startWidth() {
      let widthEle = document.getElementsByClassName("searchResultItem");
      let outEle = document.getElementById("searchResultBox");
      let outWidth = outEle.offsetWidth;
      let rows = widthEle.length;
      for (let i = 0; i < rows; i++) {
        widthEle[i].style.width = outWidth - 161 + "px";
      }
    }
  }
};
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="scss">
.el-main {
  padding: 0;
}
.selectTop {
  width: 100%;
  min-width: 1000px;
  height: 45px;
  background-color: #f6f6f6;
  margin-top: 70px;
}

.width80p {
  height: 100%;
  width: 80%;
  min-width: 1000px;
  max-width: 1200px;
}
</style>
